Anillo 3 - Original

An interactive fiction by Mel Hython (2009) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Chapter 5 - Limitaciones de movimiento

[ La única forma que se me ocurre es parando a los PNJs que vayan a entrar en ellos, pero tengo que meter el estado previo para poder arrancarlos ]

Table of Estado Previo
pnj   estado  
a patroller   a Status
lobo   Inactive
deavork   Inactive  
zhur   Inactive  
yerk   Inactive
berg   Inactive
icalante   Inactive

[ Lugares a los que NO pueden ir ]
Table of Limites
pnj   limite   activada
a patroller   a room   a number
lobo   Copa   0
lobo   Pantano10   0
lobo   Pantano23   0
deavork   Copa   0
icalante   Copa   0
icalante   Pantano10   0
icalante   PuertaCastillo   0
icalante   Pantano18   0
icalante   Pantano25   0
icalante   Pantano24   0
yerk   Copa   0
yerk   Pantano23   0
berg   Pantano23   0
zhur   Pantano23   0
yerk   Pantano24   0
berg   Pantano24   0
zhur   Pantano24   0
zhur   Cueva1   0
yerk   Cueva1   0
berg   Cueva1   0
zhur   Cueva2   0
yerk   Cueva2   0
berg   Cueva2   0
zhur   Cueva3   0
yerk   Cueva3   0
berg   Cueva3   0
zhur   Cueva4   0
yerk   Cueva4   0
berg   Cueva4   0
zhur   Cueva5   0
yerk   Cueva5   0
berg   Cueva5   0

After going to a room (called destino):
    [ Si estamos en una habitación segura, detenemos al PNJ ]
    [ Por otra parte si NO estamos en ella y está activada lo reactivamos ]
    repeat through Table of Limites:
        if destino is not limite entry and activada entry is 1:
            let st be (estado corresponding to an pnj of pnj entry in Table of Estado Previo);
            if st is Active:
                activate pnj entry;
            change activada entry to 0;
            [say "Retornando [the pnj entry] a [st].";]
    repeat through Table of Limites:
        if destino is limite entry and pnj entry is not in limite entry:
            let st be status of pnj entry;
            deactivate pnj entry;
            change activada entry to 1;
            change (estado corresponding to an pnj of pnj entry in Table of Estado Previo) to st;
            [say "Parando por tabú [the pnj entry] que estaba [st].";]
    continue the action.